<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选择你喜欢的</title>
</head>

<body>
    <div id="app">
        <h3>请选择你喜欢的栏目</h3>
        <div>
            <label v-for="(category, index) in categories" :key="index">
                <input type="checkbox" :value="category" v-model="selectedCategories"> {{ category }}
            </label>
        </div>
        <div>
            <ul>
                <li v-for="(selected, index) in selectedCategories" :key="index">{{ selected }}</li>
            </ul>
        </div>
    </div>

</body>

</html>
<script src="vue.js"></script>
<script>
    new Vue({
        el: '#app',
        data: {
            categories: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
            selectedCategories: []
        }
    });
</script>